package cn.wolfcode.wolf2w.config;

import cn.wolfcode.wolf2w.intercetor.LoginInterceptor;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/*@Configuration
public class MvcConfig implements WebMvcConfigurer {

    // 注册过滤器
    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(new LoginInterceptor())
                .addPathPatterns("/**") //要拦截的路径
                .excludePathPatterns("/users/login")    //排除拦截的路径
                //.excludePathPatterns("/users/regist")
                .excludePathPatterns("/users/sendVerifyCode")
                .excludePathPatterns("/users/checkPhone");
    }

}*/
